
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import "Answer.h"

@interface Question : NSManagedObject


@property (nonatomic, copy) NSString* questionId;
@property (nonatomic, copy) NSString* author;
@property (nonatomic, copy) NSString* questionText;
@property (nonatomic, copy) NSString* votes;
@property (nonatomic, copy) NSString* answerCount;
@property (nonatomic, copy) NSString* reputation;
@property (nonatomic, copy) NSString* gbadge;
@property (nonatomic, copy) NSString* sbadge;
@property (nonatomic, copy) NSString* bbadge;
@property (nonatomic, copy) NSString* body;
@property (nonatomic, copy) NSString* date;
@property (nonatomic, copy) NSSet* answers;
@property (nonatomic, copy) NSURL* imageURL;
@property (nonatomic, copy) UIImage* image;
@property (nonatomic, copy) NSString* userRequestURL;


+(Question*) setBadgesFor:(Question*)question source:(NSDictionary*)badges;

+(Question*) questionWithObj:(NSDictionary*)obj;

-(id) initWithObj:(NSDictionary*)obj;

- (NSDictionary *)dataForPage:(NSInteger)pageIndex;

-(void) loadImage;

@end

@interface Question (CoreDataGeneratedAccessors)
- (void)addAnswersObject:(Answer *)value;
- (void)addAnswers:(NSSet *)value;
- (void)removeAnswersObject:(Answer *)value;
- (void)removeAnswers:(NSSet *)values;
@end